package com.sensePlusVR.activity.mine;

import org.xutils.x;
import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;

import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.sensePlusVR.base.BaseActivity;
import com.sensePlusVR.main.R;
import com.sensePlusVR.utils.AppManager;
import com.sensePlusVR.utils.Constant;
import com.sensePlusVR.utils.MyPageJump;

@ContentView(R.layout.activity_setting_help)
public class HelpActivity extends BaseActivity implements OnClickListener{
	//private static final String TAG = HelpActivity.class.getSimpleName();
	@ViewInject(R.id.title_bar_left_ib)
	private ImageButton title_bar_left_ib;
	
	@ViewInject(R.id.title_bar_title_tv)
	private TextView title_bar_title_tv;
	
	@ViewInject(R.id.st_faq_relative)
	private RelativeLayout st_faq_relative;
	
	@ViewInject(R.id.st_term_relative)
	private RelativeLayout st_term_relative;
	
	@ViewInject(R.id.st_privacy_policy_relative)
	private RelativeLayout st_privacy_policy_relative;
	
	@ViewInject(R.id.st_compliance_statement_relative)
	private RelativeLayout st_compliance_statement_relative;
	
	
	@Override
	public void setMyContentView() {
		x.view().inject(this);
	}
	
	@Override
	public void initView() {
		super.initView();
		AppManager.getInstance().addActivity(this);
		title_bar_title_tv.setText(R.string.help);
		
		title_bar_left_ib.setOnClickListener(this);
		st_faq_relative.setOnClickListener(this);
		st_term_relative.setOnClickListener(this);
		st_privacy_policy_relative.setOnClickListener(this);
		st_compliance_statement_relative.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.title_bar_left_ib:
			onBackPressed();
			break;
		case R.id.st_faq_relative:
			MyPageJump.pageJumpAddString(this, HyperlinkSettingActivity.class, Constant.INTENT_HYPERLINK_KEY
					, Constant.INTENT_HYPERLINK_FAQ);
			break;
		case R.id.st_term_relative:
			MyPageJump.pageJumpAddString(this, HyperlinkSettingActivity.class, 
					Constant.INTENT_HYPERLINK_KEY, Constant.INTENT_HYPERLINK_OURTERMS);
			break;
		case R.id.st_privacy_policy_relative:
			MyPageJump.pageJumpAddString(this, HyperlinkSettingActivity.class, 
					Constant.INTENT_HYPERLINK_KEY, Constant.INTENT_HYPERLINK_PRIVACY_POLICY);
			break;
		case R.id.st_compliance_statement_relative:
			MyPageJump.pageJumpAddString(this, HyperlinkSettingActivity.class, 
					Constant.INTENT_HYPERLINK_KEY, Constant.INTENT_HYPERLINK_COMPLIANCE_STATEMENT);
			break;

		}
		
	}
	
	@Override
	public void onBackPressed() {
		super.onBackPressed();
		AppManager.getInstance().finishActivity(this);
	}
	
	

}
